package coms.dto;

import java.io.Serializable;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.text.DateFormatter;
import Util.Constant;

public class Conference implements Serializable {

    
    private int id;
    private Date conferenceEndDate;
    private Date conferenceStartDate;
    private Date registrationEndDate;
    private Date registrationStartDate;
    private Date reviewEndDate;
    private Date reviewStartDate;
    private Date submissionEndDate;
    private Date submissionStartDate;
    private String name;
    private String detail;
    private Location location;
    private String callForPaper;
    private List<ConferenceItem> conferenceItemList;
    private List<Event> eventList;
    private int cost;

    public int getCost() {
        return cost;
    }

    public void setCost(int cost) {
        this.cost = cost;
    }

    public Conference() {
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public String getCallForPaper() {
        return callForPaper;
    }

    public void setCallForPaper(String callForPaper) {
        this.callForPaper = callForPaper;
    }

    public Date getRegistrationEndDate() {
        return registrationEndDate;
    }

    public void setRegistrationEndDate(Date registrationEndDate) {
        this.registrationEndDate = registrationEndDate;
    }

    public Date getRegistrationStartDate() {
        return registrationStartDate;
    }

    public void setRegistrationStartDate(Date registrationStartDate) {
        this.registrationStartDate = registrationStartDate;
    }

    public Date getReviewEndDate() {
        return reviewEndDate;
    }

    public void setReviewEndDate(Date reviewEndDate) {
        this.reviewEndDate = reviewEndDate;
    }

    public Date getReviewStartDate() {
        return reviewStartDate;
    }

    public void setReviewStartDate(Date reviewStartDate) {
        this.reviewStartDate = reviewStartDate;
    }

    public Date getSubmissionEndDate() {
        return submissionEndDate;
    }

    public void setSubmissionEndDate(Date submissionEndDate) {
        this.submissionEndDate = submissionEndDate;
    }

    public Date getSubmissionStartDate() {
        return submissionStartDate;
    }

    public void setSubmissionStartDate(Date submissionStartDate) {
        this.submissionStartDate = submissionStartDate;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public List<ConferenceItem> getConferenceItemList() {
        return conferenceItemList;
    }

    public void setConferenceItemList(List<ConferenceItem> conferenceItemList) {
        this.conferenceItemList = conferenceItemList;
    }

    public List<Event> getEventList() {
        return eventList;
    }

    public void setEventList(List<Event> eventList) {
        this.eventList = eventList;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public Date getConferenceEndDate() {
        return conferenceEndDate;
    }

    public void setConferenceEndDate(Date conferenceEndDate) {
        this.conferenceEndDate = conferenceEndDate;
    }

    public Date getConferenceStartDate() {
        return conferenceStartDate;
    }

    public void setConferenceStartDate(Date conferenceStartDate) {
        this.conferenceStartDate = conferenceStartDate;
    }

    public String getConferenceStartDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATETIME_FORMAT);
        return conferenceStartDate == null ? "" : df.format(conferenceStartDate);
    }

    public String getConferenceEndDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATETIME_FORMAT);
        return conferenceEndDate == null ? "" : df.format(conferenceEndDate);
    }

    public String getRegistrationEndDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return registrationEndDate == null ? "" : df.format(registrationEndDate);
    }

    public String getRegistrationStartDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return registrationStartDate == null ? "" : df.format(registrationStartDate);
    }

    public String getReviewEndDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return reviewEndDate == null ? "" : df.format(reviewEndDate);
    }

    public String getReviewStartDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return reviewStartDate == null ? "" : df.format(reviewStartDate);
    }

    public String getSubmissionEndDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return submissionEndDate == null ? "" : df.format(submissionEndDate);
    }

    public String getSubmissionStartDateStr() {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        return submissionStartDate == null ? "" : df.format(submissionStartDate);
    }

    public void setConferenceStartDateStr(String conferenceStartDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATETIME_FORMAT);
        try {
            this.conferenceStartDate = df.parse(conferenceStartDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setConferenceEndDateStr(String conferenceEndDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATETIME_FORMAT);
        try {
            this.conferenceEndDate = df.parse(conferenceEndDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setRegistrationEndDateStr(String registrationEndDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.registrationEndDate = df.parse(registrationEndDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setRegistrationStartDateStr(String registrationStartDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.registrationStartDate = df.parse(registrationStartDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setReviewEndDateStr(String reviewEndDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.reviewEndDate = df.parse(reviewEndDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setReviewStartDateStr(String reviewStartDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.reviewStartDate = df.parse(reviewStartDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setSubmissionEndDateStr(String submissionEndDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.submissionEndDate = df.parse(submissionEndDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public void setSubmissionStartDateStr(String submissionStartDate) {
        DateFormat df = new SimpleDateFormat(Constant.DATE_FORMAT);
        try {
            this.submissionStartDate = df.parse(submissionStartDate);
        } catch (ParseException ex) {
            Logger.getLogger(Conference.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
